package com.itheima.d03_recursion_use;

public class Test2 {


    public static  int sum(int n){
        //终结点
        if(n == 1){
            return 1;
        }

        return sum(n-1) + n;
    }


    public static void main(String[] args) {
        System.out.println(sum(100));
    }
}
